<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .comtainer {
            width: 1500px;
            background-color: lightgreen;
            display: flex;
            flex-direction: row-reverse;
            flex-direction: column;
            flex-direction: column-reverse;
            flex-direction: row;
        /*    设置子项目是否换行*/
            /*默认：父容器空间不足时，子项目会压缩自己也不会换行*/
            flex-wrap: nowrap;
            flex-wrap: wrap;
        }
        .item {
            width: 100px;
            height: 100px;
            background-color: lightpink;
            border: 3px solid deeppink;
            font-size: 45px;
            float: left;
        }
    </style>
</head>
<body>
<div>
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>
    <div>6</div>
    <div>7</div>
</div>
</body>
</html>